package com.lj.api.aspect.tools;

import com.lj.api.conifg.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * 对这个类中方法，进行aop拦截，添加try catch
 */
@Component
public class RedisTools {

    @Autowired
    RedisUtils redisUtils;

    public List<Object> lGet(String key, long start, long end){
        return redisUtils.lGet(key,start,end);
    }

    public boolean lSet(String key, Object value){
        return redisUtils.lSet(key,value);
    }

    public boolean rpush(String key, List<Object> value){
        return redisUtils.lSet(key,value);
    }

    public boolean set(String key, Object value){
        return redisUtils.set(key,value);
    }


    public Object get(String key){
        return redisUtils.get(key);
    }

}
